package ThreadDemo;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/*
 * Author: JacksonCoder
 * FileName: ThreadPoolExample
 * Version: 1.0.0
 */
public class ThreadPoolExample {
    public static void main(String[] args) {
        ExecutorService executorService = Executors.newFixedThreadPool(3);

        for(int i = 0 ; i< 5; i++){
            executorService.execute(()->{
                System.out.println("Thread pool task is running");
            });
        }
        executorService.shutdown();
    }
}
